forked from AdaGold/hotel
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amper: Kaitlin Forsman #23
Open
kcforsman
wants to merge
35
commits into
Ada-C9:master
Choose a base branch
from
kcforsman:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nitialize method approach
…tart_date, end_date
…o each other and within the user class
…l reservations for a given day
… start_date and end_date, and raises an exception for trying to reserve a room that has preexisting reservation in date range
… list of available rooms for a given date_range
…_date and it allows user to make new reservation on a room starting same day as another reservations end_date
…s what it's supposed....why?
…that still needs to be dealt with
… tests (so much refactoring to consider...)
… version of the Block Class
… user to include blocks within availibility
…ilable rooms in a block -- finished first attempt at all basic requirements for this assignment
…nitialize to use dependency injection instead and trying to separate other dependencies
CheezItMan
reviewed
Mar 19, 2018
lib/block.rb
Outdated
class Block < Reservation | ||
attr_reader :id, :reservations | ||
def initialize(id, rooms, party, date_range, discount) | ||
@id = id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be using super
here. Nice work using inheritance however!
HotelWhat We're Looking For
|
CheezItMan
reviewed
Mar 19, 2018
end | ||
@rooms = rooms | ||
@reservations = [] | ||
@calendar = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting idea having a hash of the reservation dates, very efficient.
… for first part of the Design Activity
…le, so the id isn't dependent on the length of the array, which might lead to duplicate ids
…oom instance's calendar
… date_range (more like adjusted the tests because that seemed to be the main use of the date_range)
…where in the code by other classes, so didn't need to change anything else
… interact with the room's instance variable for cost
…s design and what I tried to do to implement it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions